package com.gxuwz.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.dao.impl.DataDAO;
import com.gxuwz.dao.impl.FormDao;
import com.gxuwz.pojo.DataEntity;
import com.gxuwz.pojo.SysUser;
import com.gxuwz.pojo.Topic;
import com.gxuwz.service.IDataService;
@Service("dataService")
public class DataServiceImpl implements IDataService {

	@Autowired
	private DataDAO dataDAO;
	
	
	@Override
	public void createDB(String tableName, List<Topic> topicList) {
			dataDAO.createDB(tableName, topicList);
	}


	@Override
	public void addWriter(String tableName, List<SysUser> writers) {
		// TODO Auto-generated method stub
		dataDAO.addWriter(tableName, writers);
	}


	@Override
	public List<SysUser> getWriter(String tableName) {
		// TODO Auto-generated method stub
		return dataDAO.getWriter(tableName);
	}


	@Override
	public List<DataEntity> find(String tableName, DataEntity dataEntity,
			List<Topic> topicList) {
		// TODO Auto-generated method stub
		return dataDAO.find(tableName, dataEntity, topicList);
	}


	@Override
	public void update(String tableName, Map<String, String> map) {
		// TODO Auto-generated method stub
		dataDAO.update(tableName, map);
	}


	@Override
	public boolean isWriter(String tableName, String userId) {
		// TODO Auto-generated method stub
		return dataDAO.isWriter(tableName, userId);
	}


	@Override
	public void editTable(String tableName, List<Topic> topicList) {
		// TODO Auto-generated method stub
		dataDAO.editTable(tableName, topicList);
	}


	@Override
	public void copyData(String newName, String oldName, List<Topic> newTopic, List<Topic> oldTopic) {
		// TODO Auto-generated method stub
		dataDAO.copyData(newName, oldName, newTopic, oldTopic);
	}


	@Override
	public void createDBT(String tableName, List<Topic> topicList) {
		// TODO Auto-generated method stub
		dataDAO.createDBT(tableName, topicList);
	}


	@Override
	public void addData(String tableName, Map<String, String> map) {
		// TODO Auto-generated method stub
		dataDAO.addData(tableName, map);
	}


	@Override
	public List<SysUser> getMailUser(String tableName) {
		// TODO Auto-generated method stub
		return dataDAO.getMailUser(tableName);
	}

}
